#pragma once

#include "glm.hpp"
#include "ext.hpp"

namespace ani
{
	class PointMass
	{
	public:
		PointMass();
		PointMass(const glm::vec3 & position, float mass);

		void integrate(float dt);
		void addForce(const glm::vec3 & force);

		float mMass;
		float mMassInverse;
		glm::vec3 mPosition;
		glm::vec3 mVelocity;
		glm::vec3 mForceAccum;

		// used in verlet
		glm::vec3 mPrevPosition;
		bool mFirstIter;

		void euler(float dt);
		void verlet(float dt);
	};
}
